package com.baidu.Chapter02;

import java.util.Scanner;

public class ex2_5 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print("Enter the subtotal and a gratuity rate：");
        double subtotal=sc.nextDouble();
        double rate=sc.nextDouble();
        System.out.println("The gratuity is $"+(subtotal*rate/100)+" and total is $"+(subtotal+(subtotal*rate/100)));
    }
}
